import {BasicColumn, FormSchema} from '/@/components/Table';
import {h} from 'vue';
import {Tag} from 'ant-design-vue';
import {TaskCenterList} from "/@/api/taskCenter/taskCenter";
import {getTaskTypeList} from "/@/api/taskCenter/taskType";

const taskTypeList = await getTaskTypeList();
console.log('taskTypeList', taskTypeList)
export const columns: BasicColumn[] = [
  {
    title: 'ID',
    dataIndex: 'id',
    width: 50,
    align: 'center',
  },
  {
    title: '工号',
    dataIndex: 'fnumber',
    width: 100,
    align: 'center',
  },
  {
    title: '姓名',
    dataIndex: 'fname',
    width: 100,
    align: 'center',
  },
  {
    title: '职称',
    dataIndex: 'type',
    width: 100,
    align: 'center',
  },
  {
    title: '教学课时达标分数',
    dataIndex: 'jxks_full_mark',
    width: 200,
    align: 'center',
  },

  {
    title: '教科研达标分数',
    dataIndex: 'jkyjf_full_mark',
    width: 200,
    align: 'center',
  },

  {
    title: '教科研建设达标分数',
    dataIndex: 'jkyjsjf_full_mark',
    width: 200,
    align: 'center',
  },
  {
    title: '管理与公共服务达标分数',
    dataIndex: 'glyggfwjf_full_mark',
    width: 200,
    align: 'center',
  },
];

export const searchFormSchema: FormSchema[] = [
  {
    field: 'fname',
    label: '教师名称',
    component: 'Input',
    colProps: {span: 8},
  },
  {
    field: 'fnumber',
    label: '员工号',
    component: 'Input',
    colProps: {span: 8},
  },
];

//新增弹窗form字段
export const formSchema: FormSchema[] = [
  {
    label: 'ID',
    field: 'id',
    component: 'Input',
    labelWidth: '150px',
    defaultValue: 0,
    show: false,
  },
  {
    field: 'fname',
    label: '教师姓名',
    component: 'Input',
    labelWidth: '150px',
    componentProps:{
      disabled: true,
    },
    required: true,
  },
  {
    field: 'jxks_full_mark',
    label: '教学课时达标分数',
    component: 'InputNumber',
    labelWidth: '150px',
    defaultValue: 0,
    show: true,
    required: true,
  },
  {
    field: 'jkyjf_full_mark',
    label: '教科研达标分数',
    component: 'InputNumber',
    labelWidth: '150px',
    defaultValue: 0,
    show: true,
    required: true,
  },
  {
    field: 'jkyjsjf_full_mark',
    label: '教科研建设达标分数',
    labelWidth: '150px',
    component: 'InputNumber',
    defaultValue: 0,
    show: true,
    required: true,
  },
  {
    field: 'glyggfwjf_full_mark',
    label: '管理与公共服务达标分数',
    labelWidth: '150px',
    component: 'InputNumber',
    defaultValue: 0,
    show: true,
    required: true,
  },
];
